<template>
  <div class="guide">
    <div class="menu-bar">
      <div
        @click="link(item.path)"
        class="menu-nar"
        v-for="(item, index) in list"
        :key="index"
      >
        <!-- 子导航 -->
        {{ item.name }}
      </div>
    </div>
    <div class="router-view">
      <router-view />
    </div>
  </div>
</template>
<script>
export default {
  props: {},
  data() {
    return {
      list: [
        { name: "设计理念", path: "/guide/design" },
        { name: "注意原则", path: "/guide/principle" },
      ],
    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {
    link(path) {
      this.$router.push(path);
    },
  },
  components: {},
};
</script>
<style scoped lang='scss'>
.guide {
  width: 100%;
  // background-color: aqua;
  display: flex;
  height: calc(100% - 70px);
  .menu-bar {
    width: 200px;
    display: inline-block;
    height: calc(100vh - 70px);
    overflow: hidden;
    overflow-y: auto;
    // border-right: 1px solid #cccccc;
    .menu-nar {
      text-align: left;
      margin: 20px 5px;
      margin-top: 0px;
      cursor: pointer;
    }
    .menu-nar:hover {
      color: #409eff;
    }
  }
}
</style>